import request from '@/utils/request'

export function getProductList(params) {
  return request({
    url: '/app/device/product/get',
    method: 'get',
    params
  })
}

export function getTypeList() {
  return request({
    url: '/app/device/product/type/all',
    method: 'get',
  })
}

export function updateStatus(data) {
  return request({
    url: '/app/device/product/update/status',
    method: 'post',
    data
  })
}

export function uploadPicture(data) {
  return request({
    url: '/app/device/upload/img',
    method: 'post',
    data
  })
}

export function updateProductImg(data) {
  return request({
    url: '/app/device/product/update/img',
    method: 'post',
    data
  })
}

export function updateProduct(data) {
  return request({
    url: '/app/device/product/update',
    method: 'post',
    data
  })
}


export function addProduct(data) {
  return request({
    url: '/app/device/product/add',
    method: 'post',
    data
  })
}
